package com.liu.netty5.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * Created by Administrator on 2019/8/28 0028.
 */
public class ServerHandler extends SimpleChannelInboundHandler<String> {
    @Override
    protected void messageReceived(ChannelHandlerContext ctx, String msg) throws Exception {
//       接收到的消息
        System.out.println(msg);
//        返回数据
          ctx.writeAndFlush("给你回话");
    }
}
